<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddDownstreamTaskIdIndexInOrderTaskFileListTable extends AbstractMigration
{
    public function up()
    {
        $this->table('order_task_file_list')
            ->addIndex(['downstream_task_id'], ['type' => 'normal', 'name' => 'idx_downstream_task_id'])
            ->save();
    }

    public function down()
    {
        $this->table('order_task_file_list')
            ->removeIndexByName('idx_downstream_task_id')
            ->save();
    }
}
